package com.ruoyi.game.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.game.mapper.GameRoomPlayerPosMapper;
import com.ruoyi.game.domain.GameRoomPlayerPos;
import com.ruoyi.game.service.IGameRoomPlayerPosService;

/**
 * 房间座位Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-18
 */
@Service
public class GameRoomPlayerPosServiceImpl implements IGameRoomPlayerPosService 
{
    @Autowired
    private GameRoomPlayerPosMapper gameRoomPlayerPosMapper;

    /**
     * 查询房间座位
     * 
     * @param id 房间座位主键
     * @return 房间座位
     */
    @Override
    public GameRoomPlayerPos selectGameRoomPlayerPosById(Long id)
    {
        return gameRoomPlayerPosMapper.selectGameRoomPlayerPosById(id);
    }

    /**
     * 查询房间座位列表
     * 
     * @param gameRoomPlayerPos 房间座位
     * @return 房间座位
     */
    @Override
    public List<GameRoomPlayerPos> selectGameRoomPlayerPosList(GameRoomPlayerPos gameRoomPlayerPos)
    {
        return gameRoomPlayerPosMapper.selectGameRoomPlayerPosList(gameRoomPlayerPos);
    }

    /**
     * 新增房间座位
     * 
     * @param gameRoomPlayerPos 房间座位
     * @return 结果
     */
    @Override
    public int insertGameRoomPlayerPos(GameRoomPlayerPos gameRoomPlayerPos)
    {
        gameRoomPlayerPos.setCreateTime(DateUtils.getNowDate());
        return gameRoomPlayerPosMapper.insertGameRoomPlayerPos(gameRoomPlayerPos);
    }

    /**
     * 修改房间座位
     * 
     * @param gameRoomPlayerPos 房间座位
     * @return 结果
     */
    @Override
    public int updateGameRoomPlayerPos(GameRoomPlayerPos gameRoomPlayerPos)
    {
        gameRoomPlayerPos.setUpdateTime(DateUtils.getNowDate());
        return gameRoomPlayerPosMapper.updateGameRoomPlayerPos(gameRoomPlayerPos);
    }

    /**
     * 批量删除房间座位
     * 
     * @param ids 需要删除的房间座位主键
     * @return 结果
     */
    @Override
    public int deleteGameRoomPlayerPosByIds(Long[] ids)
    {
        return gameRoomPlayerPosMapper.deleteGameRoomPlayerPosByIds(ids);
    }

    /**
     * 删除房间座位信息
     * 
     * @param id 房间座位主键
     * @return 结果
     */
    @Override
    public int deleteGameRoomPlayerPosById(Long id)
    {
        return gameRoomPlayerPosMapper.deleteGameRoomPlayerPosById(id);
    }
}
